﻿@model CompanyViewModel
<div class="layui-form-item">
	<label class="layui-form-label"><span class="c-red">*</span>商户名称</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" data-val="true" data-val-required="不能为空" asp-for="Company.CompanyName">
		<span asp-validation-for="Company.CompanyName" style="color:red;"></span>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">LOGO</label>
	<div class="layui-input-block">
		@await Component.InvokeAsync("MorePic", new MorePicViewModel { Prefix = "ctlCompanyPic", PhotoPathList = Model.Company.CompanyPic, FileNumLimit = 1 })
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">商户地址</label>
	<div class="layui-input-block">
		@await Component.InvokeAsync("Region", new RegionViewModel { Prefix = "Company.", Province = Model.Company.Province, City = Model.Company.City, Area = Model.Company.Area })
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">联系地址</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.Address">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">邮政编码</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.ZipCode">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">联系电话</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.Phone">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">传真号码</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.Fax">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">网址</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.Homepage">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">简介</label>
	<div class="layui-input-block">
		<textarea class="layui-textarea" asp-for="Company.CompanyIntro"></textarea>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">开户银行</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.BankOfDeposit">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">银行帐号</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.BankAccount">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">税号</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.TaxNum">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">行业地位</label>
	<div class="layui-input-block">
		<select class="layui-input" asp-for="Company.StatusInField" asp-items="ViewBag.StatusInFieldList"></select>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">公司规模</label>
	<div class="layui-input-block">
		<select class="layui-input" asp-for="Company.CompanySize" asp-items="ViewBag.CompanySizeList"></select>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">业务范围</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.BusinessScope">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">年销售额</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.AnnualSales">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">经营状态</label>
	<div class="layui-input-block">
		<select class="layui-input" asp-for="Company.ManagementForms" asp-items="ViewBag.ManagementFormsList"></select>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">注册资本</label>
	<div class="layui-input-block">
		<input type="text" class="layui-input" asp-for="Company.RegisteredCapital">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">所属业务员</label>
	<div class="layui-input-block">
		@await Component.InvokeAsync("MySales", new MySalesViewModel { Prefix = "Company.", RoleID = 0, SalesManager = Model.Company.SalesManager, Sales = Model.Company.Sales })
	</div>
</div>
@{
	if (Model.CompanyOptionFieldList != null)
	{
		foreach (var item in Model.CompanyOptionFieldList)
		{
			@await Component.InvokeAsync("FieldControl", new FieldControlViewModel { Prefix = "Company", ModelID = 101, IsAdminManage = true, DataSource = Model.CompanyOption, FieldName = item.FieldName, FieldValue = item.DefaultValue, FieldType = item.FieldType, FieldLevel = item.FieldLevel, FieldAlias = item.FieldAlias, Tips = item.Tips, Description = item.Description, Disabled = item.Disabled, EnableNull = item.EnableNull, Settings = item.Settings })
		}
	}
}